import matplotlib.pyplot as plt
import numpy as np
from scipy import signal


N = 6
xn = np.array([1, 1, 1, 1, 0, 0])
w = np.zeros((N, N), dtype=complex)

for k in range(N):
    for n in range(N):
        w[n, k] = np.exp(-1j * n * k * 2 * np.pi /N)


a = np.dot(xn, w) / N

print(a)
